package edu.sctu.practice.class01.zhoumengxue.test.test03;

/**
 * Created by ASUS on 2015/10/9.
 */
public class MyTime {

    private int hour;
    private int minute;
    private int second;

    public MyTime(int hour, int minute, int second) {
        this.hour = hour;
        this.minute = minute;
        this.second = second;
    }

    public void display() {
        System.out.println(hour + "时" + minute + "分" + second + "秒");
    }

    public int addSecond() {
        return second + 10;
    }

    public int addMinute() {
        return minute + 10;
    }

    public int addHour() {
        return hour + 2;
    }

    public int subSecond() {
        return second - 5;
    }

    public int subMinute() {
        return minute - 1;
    }

    public int subHour() {
        return hour - 1;
    }
}
